// 部门

import request from '@/utils/request'

// 通过一级部门id查找二级部门
export function getSecondryDeptList(data) {
  return request({
    url: '/department/getBySuperDeptId',
    method: 'post',
    data
  })
}

// 新增部门
export function addDept(data) {
  return request({
    url: '/department/addDept',
    method: 'post',
    data
  })
}

// 更新部门
export function updateDept(data) {
  return request({
    url: '/department/updateDept',
    method: 'post',
    data
  })
}

// 删除部门
export function deleteDept(data) {
  return request({
    url: '/department/deleteDept',
    method: 'post',
    data
  })
}

// 部门列表
export function getDeptList(data) {
  return request({
    url: '/department/deptList',
    method: 'post',
    data
  })
}

// 部门详情
export function getDeptDetail(data) {
  return request({
    url: '/department/deptDetail',
    method: 'post',
    data
  })
}

// 所有部门层级
export function getDeptLevel(data) {
  return request({
    url: '/department/deptLevel',
    method: 'post',
    data
  })
}

// 上级部门
export function getSuperLevelDept(data) {
  return request({
    url: '/department/superDept',
    method: 'post',
    data
  })
}

//所有部门下拉框
export function getAllDept(data){
  return request({
    url:"/department/getAllDept",
    method:"post",
    data
  })
}

//
export function getSuperDeptList(data){
  return request({
    url:"/department/deptCombo",
    method:"post",
    data
  })
}